﻿using Microsoft.VisualStudio.TestTools.UnitTesting;

using System.Xml;
using FL.Entity.DB.Baoguan;


namespace FL.Test
{
    [TestClass]
    public class XMLTest
    {
        [TestMethod]
        public void TestMethod1()
        {
            XmlDocument doc = new XmlDocument();
            doc.Load(@"E:\FuLiu\Proc\FL.Web.BackEnd\Controllers\api\data.xml");
            string json = Newtonsoft.Json.JsonConvert.SerializeXmlNode(doc);
            json = json.Replace("?xml", "xml").Replace("tcs:","tcs")
                .Replace("@xmlns:", "xmlns")
                .Replace("@schemaLocation", "schemaLocation")
                .Replace("@version", "version")
                .Replace("@encoding", "encoding");
            FL.Entity.DB.Baoguan.Rootobject obj = Newtonsoft.Json.JsonConvert.DeserializeObject<Rootobject>(json);
            //var obj1 = Newtonsoft.Json.JsonConvert.<Declaration>(json);
            //Declaration declaration = (Declaration)obj;
            //obj.
            //return "";
        }

   
    }
}
